/*
 * @Author: your name
 * @Date: 2021-04-11 11:52:20
 * @LastEditTime: 2021-04-20 22:49:20
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \chronic-back-end\module\recordMod\main.go
 */
package recordMod

import (
	"chronic/module/userMod"

	"github.com/gin-gonic/gin"
)

/*Module 推送模块 */
func Module(app *gin.Engine) {
	module := app.Group("/record")
	module.POST("/oneRecord", userMod.Allow(userMod.Doctor), postOneRecord)
	module.GET("/records", userMod.Allow(), getRecords)
	module.GET("/allRecords", userMod.Allow(userMod.Admin), getAllRecords)
	module.GET("/recordsByUserId", userMod.Allow(userMod.Admin), getRecordsByUserId)
	module.GET("/recordsByOther", userMod.Allow(userMod.Admin), getRecordsByCondition)
	module.DELETE("/admin/record", userMod.Allow(userMod.Admin), adminDeleteRecord)
}
